from selenium import webdriver
from time import sleep
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium import webdriver
# 导入 Service 类（关键）
from selenium.webdriver.chrome.service import Service

#实例化对象：

service = Service(executable_path="E:\\python\\python38\\chromedriver.exe")
driver = webdriver.Chrome(service=service)
driver.get("http://121.43.169.97:8848/pageA.html")
action = ActionChains(driver)


sleep(2)

#设置滚动条位置
ja = "window.scrollTo(0,100000)"
driver.execute_script(ja)
sleep(3)
js2 = "window.scrollTo(0,0)"
driver.execute_script(js2)

sleep(6)